import java.util.Comparator;
import java.util.TreeMap;

public class Test08 {
    public static void main(String[] args) {
        TreeMap<Integer,String> tm=new TreeMap<>(new Comparator<Integer>(){
            @Override
            public int compare(Integer o1,Integer o2){
                return o2-o1;
            }
        });
        tm.put(3,"奥利奥");
        tm.put(1,"康师傅");
        tm.put(2,"九个核桃");
        System.out.println(tm);

    }
}
